#!/usr/bin/php
<?php
/*

Copyright 2011-2012 Marin Software

This file is part of XtraBackup Manager.

XtraBackup Manager is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.

XtraBackup Manager is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with XtraBackup Manager.  If not, see <http://www.gnu.org/licenses/>.

*/


	require('includes/init.php');

	try {

		$log = new logStream(XBM_MAIN_LOG, false, $config['LOGS']['level']);

		// Create a new xbm command handler
		$cliHandler = new cliHandler();
		$cliHandler->setLogStream($log);

		// Handle the command given
		$cliHandler->handleArguments($argv);

	} catch( InputException $e ) {

		echo($e->getMessage() ."\n\n");

	} catch( Exception $e ) {

		echo($e->getMessage() ."\n\n");

	}


	/* vi: set filetype=php */
?>
